import request from '@/utils/request'
import type { ApiResponse } from '../index'

// 支付相关接口
export const paymentApi = {
  // 获取支付记录
  getList() {
    return request.get<ApiResponse>('/user/payments')
  },
  
  // 创建支付
  create(data: any) {
    return request.post<ApiResponse>('/user/payments', data)
  },
  
  // 获取支付详情
  getDetail(id: number) {
    return request.get<ApiResponse>(`/user/payments/${id}`)
  },
  
  // 取消支付
  cancel(paymentId: number) {
    return request.delete<ApiResponse>(`/user/payments/${paymentId}`)
  }
} 